package com.ang.enums.t1;

import org.apache.commons.lang3.StringUtils;

public class TestDemo {
    public static void main(String[] args) {
        TestDemo t = new TestDemo();

        String name = "NORMAL";
        String code = "normal";

        System.out.println(SimpleEnum.getSimpleEnum(name));
        System.out.println("---------------------");
        System.out.println(StatusEnum.getDescByCode(code));

        StatusEnum statusEnum1 = StatusEnum.getByName(name);
        StatusEnum statusEnum2 = StatusEnum.getByCode(code);
        System.out.println(statusEnum1);
        System.out.println(statusEnum2);
        System.out.println(StringUtils.equals(statusEnum1.getCode(), statusEnum2.getCode()));
    }
}
